package com.example.demo3;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author SWJ
 * @create 2021-07-13 12:07
 * http://localhost:8080/hi
 */
@RestController
/**作用：接收客户端请求数据返回接受数据*/
//@RequestMapping("abc")
//http://localhost8090/abc/ehi1规定了浏览器访问类的方式

public class HelloController {
    //	@RequestMapping("hi")//只匹配一个路径
    @RequestMapping({"hi", "hello/hi"})
    //匹配两种路径/hi或者/hello/hi

    public String hi() {
        return "hi springboot!";
        //把结果返回给浏览器
    }

}
